home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Tools 4
/
Amiga Tools 4.iso
/
tools
/
wb-enhancement
/
screenmaster
/
screenmaster.install
< prev
next >
Wrap
Text File
|
1995-12-10
|
11KB
|
468 lines
; *************************************************************************
; ******************* SCREENMASTER INSTALLATION SCRIPT ******************
; *************************************************************************
;
; $VER: ScreenMaster.install 1.0 (10.12.95)
;
; Copyright ©1995 Nick Christie
;
; *************************************************************************
;
; Find out about program version, etc
(set @default-dest "RAM:")
(set catsdir "Locale:Catalogs")
(set defmasterdir "SYS:Utilities")
(set defdaemondir "SYS:WBStartup")
(set defbackerdir "SYS:WBStartup")
(set defmenueddir "SYS:Utilities")
(set defguidedir "Help:")
(set masterbguiprog "Programs/BGUI/ScreenMaster")
(set mastermuiprog "Programs/MUI/ScreenMaster")
(set daemonprog "Programs/ScreenDaemon")
(set backerprog "Programs/ScreenBacker")
(set menuedbguiprog "Programs/BGUI/ScreenMenuEd")
(set menuedmuiprog "Programs/MUI/ScreenMenuEd")
(set masterguide "Docs/ScreenMaster.guide")
(set daemonguide "Docs/ScreenDaemon.guide")
(set backerguide "Docs/ScreenBacker.guide")
(set menuedguide "Docs/ScreenMenuEd.guide")
(set masterdeficon "Icons/def_ScreenMaster.info")
(set menueddeficon "Icons/def_ScreenMenuEd.info")
(set vernum-sm (getversion masterbguiprog))
(set ver-sm (/ vernum-sm 65536))
(set rev-sm (- vernum-sm (* ver-sm 65536) ) )
; if novice user-level, bump up to average
(if (= 0 @user-level)
(
(set @user-level 1)
(user 1)
)
)
(set old-user-level @user-level)
; ************************************************************************
; English strings
; ************************************************************************
(set #yes-msg "Yes")
(set #no-msg "No")
(set #bad-kick-msg "ScreenMaster requires AmigaOS 2.04 or better!")
(set #hello-msg
(cat
("Welcome to ScreenMaster V%ld.%ld\n\n" ver-sm rev-sm)
"This script will install ScreenMaster and "
"related files on your Amiga.\n\n"
"You will need to answer a few questions such as "
"where you would like the program installed.\n\n"
"If you do not wish to install ScreenMaster at this time, "
"select the 'Abort Install' button now. "
)
)
(set #which-gui-msg
(cat
"ScreenMaster and ScreenMenuEd are provided in both MUI and "
"BGUI versions.\nWhich version do you wish to install?\n"
)
)
(set #which-gui-help
(cat
"Simply select one of GUI systems indicated.\n"
"Versions of ScreenMaster and ScreenMenuEd built "
"for that GUI system will be installed."
)
)
(set #prog-askdir-msg "Select the directory to install %s in.")
(set #guide-ask-msg
(cat
"\nInstall ScreenMaster documentation?\n\n"
"(These are AmigaGuide files, and you will be asked "
"for the directory in which to install them.)"
)
)
(set #guide-askdir-msg
"Please select the directory to install the guides in."
)
(set #guide-help
(cat
"AmigaGuide is the Amiga's standard hypertext format.\n\n"
"If you have AmigaOS 3.0 or better, you can use MultiView "
"to read this documentation, otherwise you must use the AmigaGuide "
"program, which is available on AmiNet and Fred Fish disk #870.\n\n"
"Both of these viewer programs have a 'search path', a set "
"of directories they search for AmigaGuide documents. "
"You should place this guide somewhere in that path."
)
)
(set #locale-msg
(cat
"\ScreenMaster is localized, which means you may use "
"the program in several different languages. "
"Please choose your preferred languages.\n"
)
)
(set #locale-help
(cat
"These are the languages supported by ScreenMaster.\n\n"
"Simply specify the languages you prefer and the "
"required catalog files will be copied to the "
"Locale:Catalogs directory.\n\nEnglish is built-in "
"and does not require a catalog file."
)
)
; ************************************************************************
; xxxx strings - template for other languages
; ************************************************************************
(if (= @language "xxxx")
(
(set #yes-msg "Yes")
(set #no-msg "No")
(set #bad-kick-msg "ScreenMaster requires AmigaOS 2.04 or better!")
(set #hello-msg
(cat
("Welcome to ScreenMaster V%ld.%ld\n\n" ver-sm rev-sm)
"This script will install ScreenMaster and "
"related files on your Amiga.\n\n"
"You will need to answer a few questions such as "
"where you would like the program installed.\n\n"
"If you do not wish to install ScreenMaster at this time, "
"select the 'Abort Install' button now. "
)
)
(set #which-gui-msg
(cat
"ScreenMaster and ScreenMenuEd are provided in both MUI and "
"BGUI versions.\nWhich version do you wish to install?\n"
)
)
(set #which-gui-help
(cat
"Simply select one of GUI systems indicated.\n"
"Versions of ScreenMaster and ScreenMenuEd built "
"for that GUI system will be installed."
)
)
(set #prog-askdir-msg "Select the directory to install %s in.")
(set #guide-ask-msg
(cat
"\nInstall ScreenMaster documentation?\n\n"
"(These are AmigaGuide files, and you will be asked "
"for the directory in which to install them.)"
)
)
(set #guide-askdir-msg
"Please select the directory to install the guides in."
)
(set #guide-help
(cat
"AmigaGuide is the Amiga's standard hypertext format.\n\n"
"If you have AmigaOS 3.0 or better, you can use MultiView "
"to read this documentation, otherwise you must use the AmigaGuide "
"program, which is available on AmiNet and Fred Fish disk #870.\n\n"
"Both of these viewer programs have a 'search path', a set "
"of directories they search for AmigaGuide documents. "
"You should place this guide somewhere in that path."
)
)
(set #locale-msg
(cat
"\ScreenMaster is localized, which means you may use "
"the program in several different languages. "
"Please choose your preferred languages.\n"
)
)
(set #locale-help
(cat
"These are the languages supported by ScreenMaster.\n\n"
"Simply specify the languages you prefer and the "
"required catalog files will be copied to the "
"Locale:Catalogs directory.\n\nEnglish is built-in "
"and does not require a catalog file."
)
)
) ; endif xxxx language
)
; ************************************************************************
; Begin actual installation
; ************************************************************************
; Check for KickV37 or better
(if (< (/ (getversion) 65536) 37)
(
(abort #bad-kick-msg)
)
)
; ------------------------------------------------------------------------
; Show welcome msg
(user 2)
(message #hello-msg)
(user old-user-level)
; ------------------------------------------------------------------------
; Ask user which GUI system to use.
(set gui
(askchoice
(prompt #which-gui-msg)
(help #which-gui-help)
(choices "BGUI" "MUI")
)
)
(if (= 0 gui)
; then
(
(set masterprog masterbguiprog)
(set menuedprog menuedbguiprog)
)
; else
(
(set masterprog mastermuiprog)
(set menuedprog menuedmuiprog)
)
)
; ------------------------------------------------------------------------
; Ask the user where we should install ScreenMaster.
(if (
(set masterdir
(askdir
(prompt (#prog-askdir-msg "ScreenMaster"))
(help @askdir-help)
(default defmasterdir)
)
)
)
; then
(
(copyfiles (source masterprog) (dest masterdir) (infos))
(copyfiles (source masterdeficon) (dest masterdir))
(tooltype (dest (tackon masterdir "ScreenMaster")) (noposition))
(set @default-dest masterdir)
)
)
; ------------------------------------------------------------------------
; Ask the user where we should install ScreenDaemon.
(if (
(set daemondir
(askdir
(prompt (#prog-askdir-msg "ScreenDaemon"))
(help @askdir-help)
(default defdaemondir)
)
)
)
; then
(
(copyfiles (source daemonprog) (dest daemondir) (infos))
(tooltype (dest (tackon daemondir "ScreenDaemon")) (noposition))
(if (masterdir)
; then
(
(tooltype
(dest (tackon daemondir "ScreenDaemon"))
(settooltype "MASTER" (tackon masterdir "ScreenMaster"))
)
(tooltype
(dest (tackon masterdir "ScreenMaster"))
(settooltype "DAEMON" (tackon daemondir "ScreenDaemon"))
)
)
)
)
)
; ------------------------------------------------------------------------
; Ask the user where we should install ScreenBacker.
(if (
(set backerdir
(askdir
(prompt (#prog-askdir-msg "ScreenBacker"))
(help @askdir-help)
(default defbackerdir)
)
)
)
; then
(
(copyfiles (source backerprog) (dest backerdir) (infos))
(tooltype (dest (tackon backerdir "ScreenBacker")) (noposition))
(if (masterdir)
; then
(
(tooltype
(dest (tackon backerdir "ScreenBacker"))
(settooltype "MASTER" (tackon masterdir "ScreenMaster"))
)
(tooltype
(dest (tackon masterdir "ScreenMaster"))
(settooltype "BACKER" (tackon backerdir "ScreenBacker"))
)
)
)
)
)
; ------------------------------------------------------------------------
; Ask the user where we should install ScreenMenuEd.
(if (
(set menueddir
(askdir
(prompt (#prog-askdir-msg "ScreenMenuEd"))
(help @askdir-help)
(default defmenueddir)
)
)
)
; then
(
(copyfiles (source menuedprog) (dest menueddir) (infos))
(tooltype (dest (tackon menueddir "ScreenMenuEd")) (noposition))
(copyfiles (source menueddeficon) (dest menueddir))
)
)
; ------------------------------------------------------------------------
; Ask the user which guides to install.
(set guidemask
(askoptions
(prompt #guide-ask-msg)
(help #guide-help)
(choices "ScreenMaster" "ScreenDaemon" "ScreenBacker" "ScreenMenuEd")
)
)
; ------------------------------------------------------------------------
; If any guides selected, ask which directory & install them there.
(if (<> 0 guidemask)
; then
(
(set guidedir
(askdir
(prompt #guide-askdir-msg)
(help @askdir-help)
(default defguidedir)
)
)
(if (in guidemask 0)
(
(copyfiles (source masterguide) (dest guidedir) (infos))
)
)
(if (in guidemask 1)
(
(copyfiles (source daemonguide) (dest guidedir) (infos))
)
)
(if (in guidemask 2)
(
(copyfiles (source backerguide) (dest guidedir) (infos))
)
)
(if (in guidemask 3)
(
(copyfiles (source menuedguide) (dest guidedir) (infos))
)
)
)
)
; ------------------------------------------------------------------------
; install catalog(s) - none available yet
;
;(if (exists "libs:locale.library")
; (
; (if (exists catsdir)
; (
; (user 2)
; (set lang
; (askoptions
; (prompt #locale-msg)
; (help #locale-help)
; (choices
; "Language"
; )
; (default 0)
; )
; )
; (user old-user-level)
; (set n 0)
; (while
; (set language
; (select n
; "language"
; ""
; )
; )
; (
; (if (in lang n)
; (
; (makedir (cat catsdir "/" language))
; (copyfiles
; (source (cat "Catalogs/" language))
; (dest (cat catsdir "/" language))
; (all)
; )
; )
; )
; (set n (+ n 1))
; )
; ) ; endwhile pick language n
; ) ; endthen
; ) ; endif exists catsdir
; ) ; endthen
;
;) ; endif exists locale lib